package router

import (
	"github.com/gin-gonic/gin"
	"slow-job-seeker/handler"
)

func Init() *gin.Engine {
	r := gin.Default()
	r.POST("/user/login", handler.UserLogin)
	r.POST("/userRoleAdd", handler.UserRoleAdd)
	r.POST("/roleNodeAdd", handler.RoleNodeAdd)

	r.GET("/userRoleList", handler.UserRoleList)
	r.GET("/roleNodeList", handler.RoleNodeList)
	r.GET("/userList", handler.UserList)
	r.GET("/userDetail", handler.UserDetail)
	r.GET("/userRole", handler.UserRole)
	r.GET("/roleNode", handler.RoleNode)

	//订单车辆
	r.POST("/carAdd", handler.CarAdd)
	r.POST("/carOrderAdd", handler.CarOrderAdd)
	r.GET("/carOrderList", handler.CarOrderList)
	r.GET("/carOrderDetail", handler.CarOrderDetail)

	//合同
	r.GET("/repoOrderList", handler.RepoOrderList)
	r.GET("/repoOrderDetail", handler.RepoOrderDetail)
	return r
}
